<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <!-- <script>
      var name = "zhangsan";
      console.log("1:" + name);
      if (true) {
        var name = "lisi";
        console.log("2:" + name);
      }
      console.log("3:" + name);
    </script> -->
    <script>
        let myname = 'zhansan'
        let age = 36
    </script>
    <script>
        if(typeof myname === 'undefined'){
            let myname;
            console.log("1:"+myname)
        }
        console.log("2:"+myname)
        myname = 'wangwu'
        console.log("3:"+myname)
        try {
            console.log(age)
            console.log("4:"+age)
        } catch (error) {
            let age
            console.log("5:"+age)
        }
        console.log("6:"+age)
        age = '16'
        console.log("7:"+age)
    </script>
    <script></script>
  </body>
</html>
